# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kio-extras
pkgver=20.04.3
pkgrel=0
arch="all !armhf" # armhf blocked by extra-cmake-modules
url="https://www.kde.org/applications/internet/"
pkgdesc="Additional components to increase the functionality of KIO"
license="GPL-2.0-or-later (LGPL-2.1-only OR LGPL-3.0-only)"
depends="kinit"
makedepends="extra-cmake-modules qt5-qtbase-dev qt5-qtsvg-dev karchive-dev kconfig-dev kconfigwidgets-dev kcoreaddons-dev kdbusaddons-dev kdoctools-dev kdnssd-dev kiconthemes-dev ki18n-dev kio-dev solid-dev kbookmarks-dev kguiaddons-dev syntax-highlighting-dev kpty-dev kactivities-dev phonon-dev samba-dev libssh-dev libmtp-dev gperf khtml-dev shared-mime-info nfs-utils-dev kdsoap-dev"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/release-service/$pkgver/src/kio-extras-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # Requires running dbus-server

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="25de00a7e34ce9dce36a0935544a5f4684f31db6b73e191dd0e781cc3f3f0c761d504a8d85ce8fa1fbdb827f0adccb0f4fbb09c7295456074835ffb23e114ba3  kio-extras-20.04.3.tar.xz"
